package cn.com.wdjedu.androidapp.wjeduandroid.support.lib.utils;

import android.content.Context;
import android.view.WindowManager;

import cn.com.wdjedu.androidapp.wjeduandroid.support.lib.global.GlobalContext;

/**
 * 获取屏幕资料
 */

public class ScreenMangger {

    public static float getWindowHeight(){
        WindowManager wm = (WindowManager) GlobalContext.getInstance().getApplicationContext()
                .getSystemService(Context.WINDOW_SERVICE);
        int width = wm.getDefaultDisplay().getWidth();
        int height = wm.getDefaultDisplay().getHeight();
        return height;
    }

    public static float getWindowWidth(){
        WindowManager wm = (WindowManager) GlobalContext.getInstance().getApplicationContext()
                .getSystemService(Context.WINDOW_SERVICE);
        int width = wm.getDefaultDisplay().getWidth();
        int height = wm.getDefaultDisplay().getHeight();
        return width;
    }
}
